#include <iostream>
#include <opencv2/videoio.hpp>
#include <opencv2/imgcodecs.hpp>
#include <unistd.h>
#include <thread>
#include <chrono>

struct Frame
{
    int rows;
    int cols;
    unsigned char *data;
};
class VideoCapture
{
    private:
        cv::VideoCapture *stream;
    public:
        VideoCapture();
        ~VideoCapture();
        void open(const char *url);
        Frame read();
        bool isOpened();
};


